$.extend($.fn.validatebox.defaults.rules, {
	name: {
        validator: function(value, param){
        	var name = /^[a-zA-Z]{1}([a-zA-Z0-9]|[._]){5,29}$/;
        	return name.test(value);
        },
        message: '格式不正确'
    }
});

$.extend($.fn.validatebox.defaults.rules, {
	password: {
        validator: function(value, param){
        	var password = /^\w{6,100}$/;
        	return password.test(value);
        },
        message: '格式不正确'
    }
});

$.extend($.fn.validatebox.defaults.rules, {  
    /*必须和某个字段相等*/  
    equalTo: { validator: function (value, param) { return $(param[0]).val() == value; }, message: '两次密码输入不一致' }  
});  


$.extend($.fn.validatebox.defaults.rules, {
	card: {
        validator: function(value, param){
        	var card = /^\d{15}$|^\d{18}$|^\d{17}[xX]$/;
        	return card.test(value);
        },
        message: '格式不正确'
    }
});

$.extend($.fn.validatebox.defaults.rules, {
    selectValueRequired: {
         validator: function(value,param){
              return $(param[0]).find("option:contains('"+value+"')").val() != '';
         },
    message: '请选择证件类型'
    }
});

$.extend($.fn.validatebox.defaults.rules, {
	selectProvince: {
         validator: function(value,param){
              return $(param[0]).find("option:contains('"+value+"')").val() != '';
         },
    message: '请选择省份'
    }
});

$.extend($.fn.validatebox.defaults.rules, {
    selectCity: {
         validator: function(value,param){
              return $(param[0]).find("option:contains('"+value+"')").val() != '';
         },
    message: '请选择城市'
    }
})


